﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using BizControl.Library.BusinessObjects.People;
using BizControl.Library.BusinessObjects.Models;
using BizControl.Library.BusinessObjects.Categories;

namespace BizControl.Library.Tests
{
  [TestClass]
  public class CategoryBOFixture
  {
    [TestMethod]
    public void CanCreateCategory()
    {
      var personInfo = PersonList.GetPersonList().First();
      var person = PersonBO.GetPerson(personInfo.Id);
      var model = person.Models.AddModel(ModelBO.NewModel()).Model;
      model.Name = "Model #3";
      model = model.Save();
      var category = CategoryBO.NewCategory(model);
      category.Name = "Category #1";
      category.Model = model;
      category.CreatedBy = person;
      category.LastChangedBy = person;
      category = category.Save();
    }

  }
}
